<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>会员商城 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css" />
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .swiper {
      width: 100%;
      height: 100%;
    }
    
    .swiper-slide {
      text-align: center;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
    .swiper-pagination-bullet-active {
      background-color: var(--primary);
    }
    
    .category-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="member_center.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">会员商城</h1>
      <a href="shopping_cart.html" class="relative">
        <i class="fas fa-shopping-cart text-lg"></i>
        <span class="absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full text-white text-xs flex items-center justify-center">3</span>
      </a>
    </div>
    
    <!-- 搜索栏 -->
    <div class="px-4 py-3 bg-white sticky top-13 z-10">
      <div class="flex items-center bg-gray-100 rounded-full px-4 py-2">
        <i class="fas fa-search text-gray-400 mr-2"></i>
        <input type="text" placeholder="搜索商品" class="bg-transparent border-none w-full focus:outline-none text-sm">
      </div>
    </div>
    
    <!-- 轮播图 -->
    <div class="swiper mySwiper h-40 mb-4">
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img src="https://via.placeholder.com/375x160" alt="会员专享" class="w-full h-full object-cover">
        </div>
        <div class="swiper-slide">
          <img src="https://via.placeholder.com/375x160" alt="积分兑换" class="w-full h-full object-cover">
        </div>
        <div class="swiper-slide">
          <img src="https://via.placeholder.com/375x160" alt="限时特惠" class="w-full h-full object-cover">
        </div>
      </div>
      <div class="swiper-pagination"></div>
    </div>
    
    <!-- 会员特权 -->
    <div class="px-4 py-3">
      <h2 class="text-base font-medium mb-3">会员特权</h2>
      <div class="grid grid-cols-4 gap-3">
        <div class="flex flex-col items-center">
          <div class="w-12 h-12 rounded-full primary-light-bg flex items-center justify-center mb-1">
            <i class="fas fa-tags primary-color"></i>
          </div>
          <span class="text-xs">专享折扣</span>
        </div>
        <div class="flex flex-col items-center">
          <div class="w-12 h-12 rounded-full primary-light-bg flex items-center justify-center mb-1">
            <i class="fas fa-gift primary-color"></i>
          </div>
          <span class="text-xs">生日礼包</span>
        </div>
        <div class="flex flex-col items-center">
          <div class="w-12 h-12 rounded-full primary-light-bg flex items-center justify-center mb-1">
            <i class="fas fa-shipping-fast primary-color"></i>
          </div>
          <span class="text-xs">免费配送</span>
        </div>
        <div class="flex flex-col items-center">
          <div class="w-12 h-12 rounded-full primary-light-bg flex items-center justify-center mb-1">
            <i class="fas fa-headset primary-color"></i>
          </div>
          <span class="text-xs">专属客服</span>
        </div>
      </div>
    </div>
    
    <!-- 分类导航 -->
    <div class="px-4 py-2 bg-white sticky top-24 z-10 border-b border-gray-100">
      <div class="flex overflow-x-auto whitespace-nowrap" style="scrollbar-width: none;">
        <div class="px-3 py-2 category-active">全部</div>
        <div class="px-3 py-2 text-gray-500">健康器械</div>
        <div class="px-3 py-2 text-gray-500">养老用品</div>
        <div class="px-3 py-2 text-gray-500">母婴用品</div>
        <div class="px-3 py-2 text-gray-500">生活家居</div>
        <div class="px-3 py-2 text-gray-500">积分兑换</div>
      </div>
    </div>
    
    <!-- 商品列表 -->
    <div class="p-4 grid grid-cols-2 gap-3">
      <!-- 商品项 -->
      <div class="bg-white rounded-lg p-2">
        <div class="relative">
          <div class="w-full h-36 bg-gray-100 rounded-lg overflow-hidden mb-2">
            <img src="https://via.placeholder.com/150" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <span class="absolute top-2 left-2 bg-primary text-white text-xs px-2 py-0.5 rounded">会员专享</span>
        </div>
        <div class="flex items-center mb-1">
          <span class="bg-primary-light text-xs primary-color px-1 rounded mr-1">7.5折</span>
          <span class="text-xs text-gray-500">已售152件</span>
        </div>
        <h3 class="text-sm mb-1 line-clamp-2">老人按摩椅家用全身多功能电动沙发</h3>
        <div class="flex items-center justify-between">
          <div>
            <span class="text-sm primary-color font-bold">¥1,299.00</span>
            <span class="text-xs text-gray-500 line-through ml-1">¥1,799.00</span>
          </div>
          <button class="w-6 h-6 rounded-full primary-bg flex items-center justify-center">
            <i class="fas fa-plus text-xs text-white"></i>
          </button>
        </div>
      </div>
      
      <div class="bg-white rounded-lg p-2">
        <div class="relative">
          <div class="w-full h-36 bg-gray-100 rounded-lg overflow-hidden mb-2">
            <img src="https://via.placeholder.com/150" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <span class="absolute top-2 left-2 bg-primary text-white text-xs px-2 py-0.5 rounded">会员专享</span>
        </div>
        <div class="flex items-center mb-1">
          <span class="bg-primary-light text-xs primary-color px-1 rounded mr-1">8折</span>
          <span class="text-xs text-gray-500">已售98件</span>
        </div>
        <h3 class="text-sm mb-1 line-clamp-2">婴儿推车轻便折叠高景观双向避震</h3>
        <div class="flex items-center justify-between">
          <div>
            <span class="text-sm primary-color font-bold">¥899.00</span>
            <span class="text-xs text-gray-500 line-through ml-1">¥1,099.00</span>
          </div>
          <button class="w-6 h-6 rounded-full primary-bg flex items-center justify-center">
            <i class="fas fa-plus text-xs text-white"></i>
          </button>
        </div>
      </div>
      
      <div class="bg-white rounded-lg p-2">
        <div class="relative">
          <div class="w-full h-36 bg-gray-100 rounded-lg overflow-hidden mb-2">
            <img src="https://via.placeholder.com/150" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <span class="absolute top-2 left-2 bg-primary text-white text-xs px-2 py-0.5 rounded">会员专享</span>
        </div>
        <div class="flex items-center mb-1">
          <span class="bg-primary-light text-xs primary-color px-1 rounded mr-1">8.5折</span>
          <span class="text-xs text-gray-500">已售76件</span>
        </div>
        <h3 class="text-sm mb-1 line-clamp-2">老人专用血压计 家用上臂式全自动高精准</h3>
        <div class="flex items-center justify-between">
          <div>
            <span class="text-sm primary-color font-bold">¥199.00</span>
            <span class="text-xs text-gray-500 line-through ml-1">¥299.00</span>
          </div>
          <button class="w-6 h-6 rounded-full primary-bg flex items-center justify-center">
            <i class="fas fa-plus text-xs text-white"></i>
          </button>
        </div>
      </div>
      
      <div class="bg-white rounded-lg p-2">
        <div class="relative">
          <div class="w-full h-36 bg-gray-100 rounded-lg overflow-hidden mb-2">
            <img src="https://via.placeholder.com/150" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <span class="absolute top-2 left-2 bg-green-500 text-white text-xs px-2 py-0.5 rounded">积分兑换</span>
        </div>
        <div class="flex items-center mb-1">
          <span class="bg-green-100 text-xs text-green-500 px-1 rounded mr-1">1500积分</span>
          <span class="text-xs text-gray-500">已兑换45件</span>
        </div>
        <h3 class="text-sm mb-1 line-clamp-2">多功能按摩枕 颈椎按摩器</h3>
        <div class="flex items-center justify-between">
          <div>
            <span class="text-sm text-green-500 font-bold">1500积分</span>
            <span class="text-xs text-gray-500 ml-1">+¥99.00</span>
          </div>
          <button class="w-6 h-6 rounded-full bg-green-500 flex items-center justify-center">
            <i class="fas fa-plus text-xs text-white"></i>
          </button>
        </div>
      </div>
      
      <div class="bg-white rounded-lg p-2">
        <div class="relative">
          <div class="w-full h-36 bg-gray-100 rounded-lg overflow-hidden mb-2">
            <img src="https://via.placeholder.com/150" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <span class="absolute top-2 left-2 bg-primary text-white text-xs px-2 py-0.5 rounded">会员专享</span>
        </div>
        <div class="flex items-center mb-1">
          <span class="bg-primary-light text-xs primary-color px-1 rounded mr-1">7折</span>
          <span class="text-xs text-gray-500">已售112件</span>
        </div>
        <h3 class="text-sm mb-1 line-clamp-2">老人防滑拐杖 可伸缩折叠轻便</h3>
        <div class="flex items-center justify-between">
          <div>
            <span class="text-sm primary-color font-bold">¥89.00</span>
            <span class="text-xs text-gray-500 line-through ml-1">¥129.00</span>
          </div>
          <button class="w-6 h-6 rounded-full primary-bg flex items-center justify-center">
            <i class="fas fa-plus text-xs text-white"></i>
          </button>
        </div>
      </div>
      
      <div class="bg-white rounded-lg p-2">
        <div class="relative">
          <div class="w-full h-36 bg-gray-100 rounded-lg overflow-hidden mb-2">
            <img src="https://via.placeholder.com/150" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <span class="absolute top-2 left-2 bg-primary text-white text-xs px-2 py-0.5 rounded">会员专享</span>
        </div>
        <div class="flex items-center mb-1">
          <span class="bg-primary-light text-xs primary-color px-1 rounded mr-1">8折</span>
          <span class="text-xs text-gray-500">已售86件</span>
        </div>
        <h3 class="text-sm mb-1 line-clamp-2">婴儿洗护套装 天然无刺激</h3>
        <div class="flex items-center justify-between">
          <div>
            <span class="text-sm primary-color font-bold">¥128.00</span>
            <span class="text-xs text-gray-500 line-through ml-1">¥159.00</span>
          </div>
          <button class="w-6 h-6 rounded-full primary-bg flex items-center justify-center">
            <i class="fas fa-plus text-xs text-white"></i>
          </button>
        </div>
      </div>
    </div>
    
    <!-- 加入购物车成功提示 -->
    <div class="fixed bottom-10 left-0 right-0 mx-auto w-3/4 bg-black bg-opacity-70 text-white py-2 px-4 rounded-full text-center text-sm hidden" id="addToCartTip">
      已加入购物车
    </div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js"></script>
  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 初始化轮播图
      var swiper = new Swiper(".mySwiper", {
        pagination: {
          el: ".swiper-pagination",
          dynamicBullets: true,
        },
        autoplay: {
          delay: 3000,
          disableOnInteraction: false,
        },
      });
      
      // 分类切换
      const categories = document.querySelectorAll('.px-4.py-2.bg-white.sticky.top-24 .px-3.py-2');
      categories.forEach(category => {
        category.addEventListener('click', function() {
          categories.forEach(c => {
            c.classList.remove('category-active');
            c.classList.add('text-gray-500');
          });
          this.classList.add('category-active');
          this.classList.remove('text-gray-500');
        });
      });
      
      // 加入购物车
      const addToCartButtons = document.querySelectorAll('.w-6.h-6.rounded-full');
      const addToCartTip = document.getElementById('addToCartTip');
      
      addToCartButtons.forEach(button => {
        button.addEventListener('click', function() {
          addToCartTip.classList.remove('hidden');
          setTimeout(() => {
            addToCartTip.classList.add('hidden');
          }, 2000);
        });
      });
    });
  </script>
</body>
</html> 